var opt_edit = function(value, row, index) {
	return '<a class="btn btn-warning edit_btn" data-id="' + row.id
			+ '" href="#" taget="_blank" title="编辑"><i class="fa fa-pencil-square-o "></i> 编辑</a>';
}

var opt_delete = function(value, row, index) {
	return '<a class="btn btn-danger del_one_btn" data-id="' + row.id
			+ '" href="#" taget="_blank" title="删除"><i class="fa fa-times "></i> 删除</a>';
}

var format_img = function(value, row, index) {
	if ( !empty(value) ) {
		return '<img src="' + getDomain() + value + '" style="max-width:60px;">';
	} else {
		return '';
	}
}

var format_fa = function(value, row, index) {
	if (value != '') {
		return '<i class="fa fa-' + value + '"></i>';
	} else {
		return '';
	}
}

var format_yesno = function(value, row, index) {
	return value == 1 ? '<i class="fa fa-check"></i>' : '<i class="fa fa-ban deny"></i>';
}

var format_catalog = function(value, row, index) {
	return Param.catalog[value];
}

var format_money = function(value, row, index) {
	var val = value == 0 ? '--' : value;
	return '&yen; ' + val;
}

var format_date = function(value, row, index) {
	return value.substr(0, 10);
}

var format_datetime = function(value, row, index) {
	return value.substr(0, 16);
}

var format_type = function(value, row, index) {
	return Param.type[value];
}

var format_status = function(value, row, index) {
	return Param.status[value];
}

var format_catalog_title = function(value, row, index) {
	return value + ' - (' + row.catalog + ')';
}
